package com.lin.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.lin.mapper.MmanUfactUreMapper;
import com.lin.pojo.MApply;
import com.lin.pojo.MManufacture;
import com.lin.pojo.PageVo;
import com.lin.service.MmanUfactUreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MmanUfactUreServiceImpl extends ServiceImpl<MmanUfactUreMapper, MManufacture> implements MmanUfactUreService {

    @Autowired
    MmanUfactUreMapper mmanUfactUreMapper;

    @Override
    public PageVo<MManufacture> queryAllProduction(MManufacture mManufacture, int pageno, int pagesize) {
        PageHelper.startPage(pageno,pagesize);
        //连表条件查询
        List<MManufacture> list1=mmanUfactUreMapper.queryAllProduction(mManufacture);
        PageInfo<MManufacture> page1=new PageInfo<MManufacture>(list1);
        PageVo<MManufacture> pageVo = new PageVo<MManufacture>();
        pageVo.setTotal(page1.getTotal());
        pageVo.setRows(page1.getList());
        return pageVo;
    }
}
